package Filter;

import java.util.List;

public class AndCriteria implements Criteria{
    Criteria a;
    Criteria b;

    public AndCriteria(Criteria a,Criteria b)
    {
        this.a=a;
        this.b=b;
    }


    @Override
    public List<Apple> meetCriteria(List<Apple> apples) {
        return b.meetCriteria(a.meetCriteria(apples));
    }
}
